/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50720
 Source Host           : localhost
 Source Database       : auth

 Target Server Type    : MySQL
 Target Server Version : 50720
 File Encoding         : utf-8

 Date: 12/19/2017 23:57:20 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `dept`
-- ----------------------------
DROP TABLE IF EXISTS `dept`;
CREATE TABLE `dept` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(40) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `py` varchar(255) DEFAULT NULL COMMENT '拼音',
  `short_name` varchar(255) DEFAULT NULL COMMENT '简称',
  `code` varchar(255) DEFAULT NULL COMMENT '编码',
  `level` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `parent_id` varchar(255) DEFAULT NULL COMMENT '父级',
  `parent_name` varchar(255) DEFAULT NULL COMMENT '父级名称',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `company_flag` bit(1) DEFAULT NULL COMMENT '是否是公司标记:[0：否，1：是]',
  `admin_id` varchar(40) DEFAULT NULL,
  `admin_name` varchar(40) DEFAULT NULL,
  `company` varchar(40) DEFAULT NULL COMMENT '所属公司',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `dept`
-- ----------------------------
BEGIN;
INSERT INTO `dept` VALUES ('0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '999', '2017-11-02 23:27:51', '001', '??', '2017-11-25 16:34:22', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '综合部', 'Z', null, '0001001002', null, '1', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', '', b'0', null, null, '1'), ('1', '999', '2017-10-31 20:54:40', '001', '??', '2017-12-16 16:04:01', '1', '超级管理员', b'1', '0', 'XX公司', 'X', null, '001', null, '0', null, null, '', b'1', '6512cc66-e600-46e6-b7ac-076e2b93666a', '综合1', '1'), ('1c6f1d6f-6197-4577-bd88-54c0011ef8e0', '999', '2017-11-25 15:00:42', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:00:42', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '综合部', 'Z', null, '001003001', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', null, b'0', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1'), ('2', '999', '2017-10-31 11:27:53', '001', '??', '2017-11-04 23:27:23', '001', '张三', b'0', '0', '领导班子', 'L', null, '001001001', null, '1', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', '', b'0', null, null, '1'), ('205fbdb0-6449-4205-baed-7aeb96df4144', '999', '2017-11-25 15:05:16', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:05:16', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '销售部', 'X', null, '001002004', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', null, b'0', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc'), ('308a3a7f-42f6-4857-a6a4-ba7eac2572e4', '999', '2017-11-25 15:05:07', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:05:07', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '财务部', 'C', null, '001002003', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', null, b'0', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc'), ('4bb82293-cceb-4c28-9c18-4ca8d351b9f3', '999', '2017-11-25 15:01:15', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:01:15', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '人力资源部', 'R', null, '001003002', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', null, b'0', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1'), ('59ee6f00-9052-4bd5-b893-69cce9cf86aa', '999', '2017-11-25 15:02:51', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:02:51', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '销售部', 'X', null, '001003004', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', null, b'0', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1'), ('7a58efb7-1271-4bd6-947e-acacea60c208', '999', '2017-11-01 23:31:54', '001', '??', '2017-12-08 17:31:32', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '公司总部', 'G', null, '001001', null, '1', '1', 'XX公司', null, b'0', null, null, '1'), ('819d63e4-803d-4a3a-9184-63b1b05ddcd6', '999', '2017-11-25 15:04:47', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:04:47', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '人力资源部', 'R', null, '001002002', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', null, b'0', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc'), ('839c33f4-fb40-43a2-bda5-b6403442386b', '999', '2017-11-25 15:02:29', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-12-16 16:30:30', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', b'1', '0', '财务部', 'C', null, '001003003', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', null, null, null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1'), ('8482ccdd-8c82-4ae1-ae9a-b3f5114df80a', '999', '2017-11-25 15:04:20', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:04:20', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '综合部', 'Z', null, '001002001', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', null, b'0', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc'), ('8b3097a2-e46e-494f-bd6a-2a22155275f7', '999', '2017-11-04 13:26:04', '001', '张三', '2017-11-04 13:26:04', '001', '张三', b'1', '0', '技术部', 'J', null, '001001005', null, '5', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', null, b'0', null, null, '1'), ('9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '999', '2017-11-04 13:25:43', '001', '张三', '2017-11-04 13:25:43', '001', '张三', b'1', '0', '财务部', 'C', null, '001001004', null, '4', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', null, b'0', null, null, '1'), ('c3ce2183-03d9-45e2-a09b-9b4507db03dc', '999', '2017-11-03 23:19:44', '001', '??', '2017-12-18 20:29:55', '1', '超级管理员', b'1', '0', '北京分公司', 'B', null, '001002', null, '1', '1', 'XX公司', '', b'1', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', 'c3ce2183-03d9-45e2-a09b-9b4507db03dc'), ('db01bc2b-b8ea-4b77-9a4d-c4decb7c4b2d', '999', '2017-11-04 13:25:17', '001', '张三', '2017-11-25 16:34:29', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '人力资源部', 'R', null, '001001003', null, '2', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', null, b'0', null, null, '1'), ('ee8a3820-295f-47f5-bfe5-793c4426ca54', '999', '2017-11-04 13:26:21', '001', '张三', '2017-11-04 13:26:21', '001', '张三', b'1', '0', '运维部', 'Y', null, '001001006', null, '6', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', null, b'0', null, null, '1'), ('f9c13a05-8ba1-444b-aa12-3e90603264c1', '999', '2017-11-04 13:09:33', '001', '张三', '2017-12-16 16:49:03', '1', '超级管理员', b'1', '0', '上海分公司', 'S', null, '001003', null, '3', '1', 'XX公司', null, b'1', '6512cc66-e600-46e6-b7ac-076e2b936603', '综合4', 'f9c13a05-8ba1-444b-aa12-3e90603264c1');
COMMIT;

-- ----------------------------
--  Table structure for `dept_user_mapping`
-- ----------------------------
DROP TABLE IF EXISTS `dept_user_mapping`;
CREATE TABLE `dept_user_mapping` (
  `id` varchar(40) NOT NULL COMMENT '主键',
  `tenant_id` varchar(40) DEFAULT NULL,
  `dept_id` varchar(40) DEFAULT NULL COMMENT '部门Id',
  `dept_name` varchar(50) DEFAULT NULL COMMENT '部门名称',
  `user_id` varchar(40) DEFAULT NULL COMMENT '用户Id',
  `user_name` varchar(50) DEFAULT NULL COMMENT '用户名称',
  `visible` bit(1) DEFAULT NULL COMMENT '是否可见：[1：是，0：否]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `dept_user_mapping`
-- ----------------------------
BEGIN;
INSERT INTO `dept_user_mapping` VALUES ('6f423fc3-59a9-401c-b899-fb27b33fe659', '999', 'fa7d0993-b079-46a8-a742-40b7c644a5bc', 'string', 'string', 'string', b'1'), ('78466cec-6e06-4588-9fe5-163cabf5eeab', '999', 'fa7d0993-b079-46a8-a742-40b7c644a5bc', 'string', 'string', 'string', b'0');
COMMIT;

-- ----------------------------
--  Table structure for `grade`
-- ----------------------------
DROP TABLE IF EXISTS `grade`;
CREATE TABLE `grade` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `py` varchar(255) DEFAULT NULL COMMENT '拼音',
  `sort` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `grade`
-- ----------------------------
BEGIN;
INSERT INTO `grade` VALUES ('1', '999', '2017-11-04 17:35:03', '001', '张三', '2017-12-13 21:47:37', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '分管副总', 'F', '2'), ('2', '999', '2017-11-04 17:34:46', '001', '张三', '2017-12-13 21:47:28', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '董事长', 'D', '1'), ('3', '999', '2017-11-04 17:35:09', '001', '张三', '2017-12-13 21:47:51', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '部门主任', 'B', '4'), ('4', '999', '2017-11-04 17:34:55', '001', '张三', '2017-12-16 18:25:20', '1', '超级管理员', b'1', '0', '总经理', 'Z', '3');
COMMIT;

-- ----------------------------
--  Table structure for `group`
-- ----------------------------
DROP TABLE IF EXISTS `group`;
CREATE TABLE `group` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `company` varchar(255) NOT NULL COMMENT '所属公司',
  `code` varchar(255) DEFAULT NULL COMMENT '编码',
  `name` varchar(255) NOT NULL COMMENT '群组名称',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `status_flag` bit(1) DEFAULT NULL COMMENT '启停用状态：[0：停用，1：启用]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `group`
-- ----------------------------
BEGIN;
INSERT INTO `group` VALUES ('68a0116c-2f6b-47eb-92ab-00317ed54e15', '999', '2017-12-16 22:12:12', '1', '超级管理员', '2017-12-16 22:12:21', '1', '超级管理员', b'1', '0', '1', '002', '群组2', null, '1', b'1'), ('7861dca7-1555-404c-b3b4-4038f24179a5', '999', '2017-12-16 20:19:08', '1', '超级管理员', '2017-12-16 21:18:56', '1', '超级管理员', b'1', '0', '1', '001', '群组1', null, '0', b'1'), ('e8005a07-67ef-422b-a064-b495424ac7fd', '999', '2017-12-19 21:59:03', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', '2017-12-19 21:59:03', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', b'1', '0', 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '001', 'test01', null, null, b'1');
COMMIT;

-- ----------------------------
--  Table structure for `group_user_mapping`
-- ----------------------------
DROP TABLE IF EXISTS `group_user_mapping`;
CREATE TABLE `group_user_mapping` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `user_id` varchar(255) DEFAULT NULL COMMENT '用户Id',
  `user_name` varchar(255) DEFAULT NULL COMMENT '用户名称',
  `group_id` varchar(255) DEFAULT NULL COMMENT '群组Id',
  `group_name` varchar(255) DEFAULT NULL COMMENT '群组名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `group_user_mapping`
-- ----------------------------
BEGIN;
INSERT INTO `group_user_mapping` VALUES ('00c61440-ba7f-4234-b5f1-78d3a8c7c4ea', '999', '9c369265-aea3-4eec-aa9b-9a5cafb156bc', '员工3', 'e8005a07-67ef-422b-a064-b495424ac7fd', 'test01'), ('273fdecd-a08d-46ee-a143-c207eb03cca7', '999', '6512cc66-e600-46e6-b7ac-076e2b936621', '运维1', '68a0116c-2f6b-47eb-92ab-00317ed54e15', '群组2'), ('3ed03ad0-bf7a-40d7-baa9-b6558aef7071', '999', '8a64aa6f-32b6-478b-a5cf-444ebdd0aee6', '何燎原', '68a0116c-2f6b-47eb-92ab-00317ed54e15', '群组2'), ('8aad70ee-392e-485f-aaab-73ec734d8bb3', '999', '6512cc66-e600-46e6-b7ac-076e2b936605', '综合6', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1'), ('928ebbba-b34e-4d12-8c01-dd8cd011fea2', '999', '6512cc66-e600-46e6-b7ac-076e2b936604', '综合5', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1'), ('947b2942-acff-4fd2-92cf-4c1438639303', '999', '6f323bff-c158-419e-b4f2-d799656b5fe0', '孙七', '68a0116c-2f6b-47eb-92ab-00317ed54e15', '群组2'), ('9953e1d7-d6bd-454f-b2bb-22e96b79c2c1', '999', '6512cc66-e600-46e6-b7ac-076e2b936603', '综合4', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1'), ('9f76269c-35ce-4d1e-b9c4-fecd3b2c9fe1', '999', 'f342584a-df41-47de-beca-1db53a5a1b02', '员工2', 'e8005a07-67ef-422b-a064-b495424ac7fd', 'test01'), ('a57920b7-79a9-47c9-9295-3d95d4694278', '999', 'bfd73592-f669-48c7-a56e-373ddd0f915c', '张三', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1'), ('ad4cfbc4-0807-419b-91a8-a53e67c417c3', '999', '6512cc66-e600-46e6-b7ac-076e2b93666a', '综合1', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1'), ('ae0a2fd9-21eb-4d11-a9ba-1f1b62965edc', '999', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', 'e8005a07-67ef-422b-a064-b495424ac7fd', 'test01'), ('c7ef7027-657d-4e27-8c0c-b4e944b6eeef', '999', '6512cc66-e600-46e6-b7ac-076e2b936601', '综合2', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1'), ('d6a9d386-179e-4707-9465-2534002daf41', '999', '6512cc66-e600-46e6-b7ac-076e2b936622', '运维2', '68a0116c-2f6b-47eb-92ab-00317ed54e15', '群组2'), ('f1c8ab0f-f5d4-496b-95ab-3520da5e91fa', '999', '6512cc66-e600-46e6-b7ac-076e2b936602', '综合3', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1');
COMMIT;

-- ----------------------------
--  Table structure for `menu`
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `tenant_id` varchar(32) DEFAULT NULL,
  `module` varchar(20) DEFAULT NULL,
  `code` varchar(50) DEFAULT NULL COMMENT '资源编码',
  `name` varchar(50) NOT NULL COMMENT '资源名称',
  `icon` varchar(50) DEFAULT NULL COMMENT '菜单图标',
  `url` varchar(100) DEFAULT NULL COMMENT '菜单链接',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '父ID',
  `menu_flag` bit(1) DEFAULT NULL COMMENT '菜单标志：[0：资源，1：菜单]',
  `leaf` bit(1) DEFAULT NULL COMMENT '叶子节点',
  `sort` int(11) DEFAULT NULL COMMENT '排序字段',
  `status_flag` bit(1) DEFAULT NULL COMMENT '启停用标志【0：停用，1：启用】',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `menu`
-- ----------------------------
BEGIN;
INSERT INTO `menu` VALUES ('11', '999', 'workflow/task', 'workflow:task', '任务', 'task', '/workflow/task', null, b'1', b'0', '1', b'1'), ('110', '999', 'workflow/task', 'workflow:task:listdraft', '我的草稿', 'draft', '/workflow/task/list/draft', '11', b'1', b'1', '1', b'1'), ('111', '999', 'workflow/task', 'workflow:task:listinitiator', '我发起的', 'initiator', '/workflow/task/list/initiator', '11', b'1', b'1', '1', b'1'), ('112', '999', 'workflow/task', 'workflow:task:listhandle', '我办理的', 'handle', '/workflow/task/list/handle', '11', b'1', b'1', '1', b'1'), ('113', '999', 'workflow/task', 'workflow:task:listall', '全部任务', 'all', '/workflow/task/list/all', '11', b'1', b'1', '1', b'1'), ('12', '999', 'workflow/task', 'workflow:task:demo', '测试', 'demo', '/workflow/task/demo', null, b'1', b'0', '2', b'1'), ('91', '999', 'system', 'system:auth', '权限管理', 'authority', '/system/auth', null, b'1', b'0', '1', b'1'), ('910', '999', 'system', 'system:auth:dept', '团队管理', 'dept', '/system/auth/dept', '91', b'1', b'1', '1', b'1'), ('911', '999', 'system', 'system:auth:role', '角色管理', 'role', '/system/auth/role', '91', b'1', b'1', '2', b'1'), ('912', '999', 'system', 'system:auth:grade', '职级管理', 'grade', '/system/auth/grade', '91', b'1', b'1', '3', b'1'), ('913', '999', 'system', 'system:auth:position', '岗位管理', 'position', '/system/auth/position', '91', b'1', b'1', '4', b'1'), ('92', '999', 'system', 'system:org', '组织管理', 'org', '/system/org', null, b'1', b'0', '2', b'1'), ('922', '999', 'system', 'system:org:user', '员工管理', 'user', '/system/org/user', '92', b'1', b'0', '2', b'1'), ('9220', '999', 'system', 'system:org:user:create', '新建员工', 'user', '', '922', b'0', b'1', '1', b'1'), ('9221', '999', 'system', 'system:org:user:update', '编辑员工', 'user', '', '922', b'0', b'1', '2', b'1');
COMMIT;

-- ----------------------------
--  Table structure for `permission`
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `code` varchar(255) DEFAULT NULL COMMENT '编码',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `parent_id` varchar(255) DEFAULT NULL COMMENT '父级',
  `parent_name` varchar(255) DEFAULT NULL COMMENT '父级名称',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `position`
-- ----------------------------
DROP TABLE IF EXISTS `position`;
CREATE TABLE `position` (
  `id` varchar(40) NOT NULL COMMENT '主键',
  `tenant_id` varchar(40) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(40) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(50) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(40) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(50) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `py` varchar(50) DEFAULT NULL COMMENT '拼音',
  `code` varchar(20) DEFAULT NULL COMMENT '编码',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `company` varchar(40) DEFAULT NULL,
  `dept_id` varchar(40) DEFAULT NULL COMMENT '所属部门',
  `dept_name` varchar(100) DEFAULT NULL COMMENT '所属部门名称',
  `description` varchar(200) DEFAULT NULL COMMENT '描述',
  `extend` bit(1) DEFAULT NULL COMMENT '是否继承到下级:[0：否，1：是]',
  `bubble` bit(1) DEFAULT NULL COMMENT '是否上级可以见:[0：否，1：是]',
  `status_flag` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `position`
-- ----------------------------
BEGIN;
INSERT INTO `position` VALUES ('1', '999', '2017-11-04 17:38:44', '001', '张三', '2017-12-16 18:27:51', '1', '超级管理员', b'1', '0', '董事长', 'D', '001', '0', '1', '1', 'XX公司', '', b'1', b'0', b'1'), ('2', '999', '2017-11-04 21:14:03', '001', '张三', '2017-11-25 16:42:32', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '分管副总', 'F', '003', '1', '1', '1', 'XX公司', '', b'1', b'0', b'1'), ('3', '999', '2017-11-04 21:13:45', '001', '张三', '2017-11-25 14:49:07', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '总经理', 'Z', '002', '0', '1', '1', 'XX公司', '', b'1', b'1', b'1'), ('4', '999', '2017-11-04 21:15:36', '001', '张三', '2017-11-25 14:49:17', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '部门主任', 'B', '004', '1', '1', '1', 'XX公司', '', b'1', b'0', b'1');
COMMIT;

-- ----------------------------
--  Table structure for `position_user_mapping`
-- ----------------------------
DROP TABLE IF EXISTS `position_user_mapping`;
CREATE TABLE `position_user_mapping` (
  `id` varchar(40) NOT NULL COMMENT '主键',
  `tenant_id` varchar(40) DEFAULT NULL,
  `user_id` varchar(40) DEFAULT NULL COMMENT '用户Id',
  `user_name` varchar(50) DEFAULT NULL COMMENT '用户名称',
  `position_id` varchar(40) DEFAULT NULL COMMENT '岗位Id',
  `position_name` varchar(50) DEFAULT NULL COMMENT '岗位名称',
  `dept_id` varchar(40) DEFAULT NULL COMMENT '所属部门',
  `dept_name` varchar(50) DEFAULT NULL COMMENT '所属部门名称',
  `extend` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `position_user_mapping`
-- ----------------------------
BEGIN;
INSERT INTO `position_user_mapping` VALUES ('070ed1dd-37fc-40d9-bc22-159ca2b1a569', null, '3b3f366a-9703-42f9-9a7b-3a7795521003', '测试3', '2', '分管副总', '308a3a7f-42f6-4857-a6a4-ba7eac2572e4', '财务部', b'1'), ('109033bc-845d-429c-a2ea-aca2520db5c6', null, '100bd9c0-10c8-4c16-aff9-ff1202aee2dd', '测试4', '4', '部门主任', '8482ccdd-8c82-4ae1-ae9a-b3f5114df80a', '综合部', b'1'), ('139714c3-d7cb-4ee5-8627-2cbe183da57e', null, 'bfd73592-f669-48c7-a56e-373ddd0f915c', '张三', '4', '部门主任', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', b'1'), ('14c36dbd-16ed-4e1b-84f6-ac4a73384129', null, '751b7f52-f814-4e46-8643-f368e96b8bbe', '赵星火', '2', '分管副总', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', b'1'), ('290cad67-07db-4399-bdce-71d8d6bd3e93', null, '9b8f2e6c-2124-4612-92ba-0b784c0c8540', '测试2', '2', '分管副总', '8482ccdd-8c82-4ae1-ae9a-b3f5114df80a', '综合部', b'1'), ('3515a3f8-9226-4e7c-8abe-46f6e25e4c4e', null, '8a64aa6f-32b6-478b-a5cf-444ebdd0aee6', '何燎原', '2', '分管副总', 'ee8a3820-295f-47f5-bfe5-793c4426ca54', '运维部', b'1'), ('3c5eeef9-4bac-4add-bbbd-aaa8830b1a04', null, 'c65a74e2-198c-481d-8296-c155eefc3f15', '王解放', '2', '分管副总', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', null), ('3f47d9fb-af64-409a-8f8c-2605e75e683b', null, '0463af29-5c78-4c54-85e4-fae3f7951bc5', '张一伟', '1', '董事长', '1', 'XX公司', b'1'), ('531a9936-0586-42b0-b0f2-33f72b04ef63', null, '0193b885-f5a8-435d-90d3-76c8fab7c949', '王五', '4', '部门主任', '9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '财务部', b'1'), ('58d5b746-2eea-4845-8c81-71ccb8eae076', null, 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', '3', '总经理', 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', b'1'), ('645b6c60-6055-4276-89bc-928fcc2acf18', null, 'f342584a-df41-47de-beca-1db53a5a1b02', '员工2', '2', '分管副总', '4bb82293-cceb-4c28-9c18-4ca8d351b9f3', '人力资源部', b'1'), ('658581ed-a274-4767-bdcf-3ef4a71d9edd', null, '4838fb70-992e-48dd-a9cb-4e9d808b060b', '测试1', '3', '总经理', 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', b'1'), ('6f0228c6-c449-4636-bf6a-3e68d71eb2c1', null, '966b0772-f87d-43b8-90d7-e95244a9dc48', '赵六', '4', '部门主任', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', b'1'), ('70346ccc-d565-4565-bb59-b0c9deccd449', null, '966b0772-f87d-43b8-90d7-e95244a9dc07', '人力1', '4', '部门主任', 'db01bc2b-b8ea-4b77-9a4d-c4decb7c4b2d', '人力资源部', b'1'), ('753396d1-4590-4416-be59-f0f27fabbcf0', null, 'f6a3d5ce-382f-4657-869c-9812cb64981a', '员工4', '4', '部门主任', '1c6f1d6f-6197-4577-bd88-54c0011ef8e0', '综合部', b'1'), ('78bafdd1-3899-4ff4-9d02-87e3532da256', null, '9c369265-aea3-4eec-aa9b-9a5cafb156bc', '员工3', '2', '分管副总', '839c33f4-fb40-43a2-bda5-b6403442386b', '财务部', b'1'), ('8028e6ca-61fb-487b-ab2b-a5025304ee3e', null, '797cadfd-232b-4449-a861-38eeea22ca2b', '员工11', '4', '部门主任', '59ee6f00-9052-4bd5-b893-69cce9cf86aa', '销售部', b'1'), ('84d6cb00-3273-40c5-8597-3fc68f5a23d5', null, '0bec7771-b8b5-4d4a-ac6d-7104ac07bb46', '测试7', '4', '部门主任', '819d63e4-803d-4a3a-9184-63b1b05ddcd6', '人力资源部', b'1'), ('898b4241-8002-4d5a-951e-f71ef3aee889', null, 'c65a74e2-198c-481d-8296-c155eefc3f15', '王解放', '3', '总经理', '1', 'XX公司', b'0'), ('90f22ba1-c232-4fa6-8676-9e5e859bb267', null, 'c65a74e2-198c-481d-8296-c155eefc3f15', '王解放', '2', '分管副总', 'db01bc2b-b8ea-4b77-9a4d-c4decb7c4b2d', '人力资源部', b'1'), ('9419674a-c1dd-4698-b2c1-f05007803bae', null, '881f475b-49f6-4ced-b7f5-544feb011e3c', '员工7', '4', '部门主任', '4bb82293-cceb-4c28-9c18-4ca8d351b9f3', '人力资源部', b'1'), ('9ac5de9d-6d1a-4332-9021-3b1549acb298', null, 'c65a74e2-198c-481d-8296-c155eefc3f15', '王解放', '3', '总经理', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', b'1'), ('9fdebfd1-ed0f-45ee-a068-bb1fb81f2efb', null, 'f342584a-df41-47de-beca-1db53a5a1b02', '员工2', '2', '分管副总', '1c6f1d6f-6197-4577-bd88-54c0011ef8e0', '综合部', b'1'), ('a56a7c8e-3e77-4a26-a456-63f106d9ebd3', null, '6f323bff-c158-419e-b4f2-d799656b5fe0', '孙七', '4', '部门主任', 'ee8a3820-295f-47f5-bfe5-793c4426ca54', '运维部', b'1'), ('a594a94a-f0e5-4217-b27b-19a9ae76d540', null, 'd15dd2b8-086f-4120-b59f-56850963361c', '李建设', '2', '分管副总', '9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '财务部', b'1'), ('a642900e-8c93-403c-88c9-46af84594686', null, '73fd96a3-323c-4968-892c-aeb999924f78', '李四', '4', '部门主任', 'db01bc2b-b8ea-4b77-9a4d-c4decb7c4b2d', '人力资源部', b'1'), ('bba2c840-0456-4b86-9419-3c5a561b5ce6', null, '58c016f8-9651-401c-82f4-196a8636441e', '员工9', '4', '部门主任', '839c33f4-fb40-43a2-bda5-b6403442386b', '财务部', b'1'), ('c5323c41-dadf-4cc7-9d43-3fe561416120', null, '3b3f366a-9703-42f9-9a7b-3a7795521003', '测试3', '2', '分管副总', '205fbdb0-6449-4205-baed-7aeb96df4144', '销售部', b'1'), ('ceba5c79-5564-4614-84dc-ab84dcdbc3ce', null, '9b8f2e6c-2124-4612-92ba-0b784c0c8540', '测试2', '2', '分管副总', '819d63e4-803d-4a3a-9184-63b1b05ddcd6', '人力资源部', b'1'), ('d3a40f0a-b1e2-492c-87ba-62c111d34a1e', null, 'aa425227-389b-43f2-9632-a63b9844f740', '测试11', '4', '部门主任', '205fbdb0-6449-4205-baed-7aeb96df4144', '销售部', b'1'), ('ddfe6abd-a45f-4b95-8e38-0b02e78d2de7', null, '9c369265-aea3-4eec-aa9b-9a5cafb156bc', '员工3', '2', '分管副总', '59ee6f00-9052-4bd5-b893-69cce9cf86aa', '销售部', b'1'), ('e182c6be-e199-4be7-bfad-2af7619e12d2', null, '27a1ac7e-8910-4846-94de-508d16872fa7', '测试9', '4', '部门主任', '308a3a7f-42f6-4857-a6a4-ba7eac2572e4', '财务部', b'1');
COMMIT;

-- ----------------------------
--  Table structure for `role`
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` varchar(40) NOT NULL COMMENT '主键',
  `tenant_id` varchar(40) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `creator_id` varchar(40) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(20) NOT NULL COMMENT '创建者姓名',
  `updator_id` varchar(40) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(20) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `company` varchar(40) DEFAULT NULL COMMENT '   所属公司',
  `code` varchar(20) DEFAULT NULL COMMENT '编码',
  `name` varchar(20) NOT NULL COMMENT '角色名称',
  `sort` int(11) DEFAULT NULL,
  `description` varchar(50) DEFAULT NULL COMMENT '描述',
  `status_flag` bit(1) NOT NULL COMMENT '启停用状态：[0：停用，1：启用]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `role`
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES ('1', '999', '2017-11-04 18:20:56', '2017-12-16 18:15:45', '001', '张三', '1', '超级管理员', b'1', '0', '1', 'admin_system', '系统管理员', '1', null, b'1'), ('1c98078e-38ac-474e-a524-8c61417bd1d1', '999', '2017-12-15 21:27:55', '2017-12-15 21:27:55', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', b'0', '0', 'f9c13a05-8ba1-444b-aa12-3e90603264c1', 'admin_system', 'admin_system', null, null, b'1'), ('2', '999', '2017-11-04 18:21:44', '2017-12-15 21:26:59', '001', '张三', '1', '超级管理员', b'1', '0', '1', 'admin_system', '流程统计专员', null, null, b'1'), ('31e61892-f25c-4d23-993e-11d52b6548bd', '999', '2017-12-15 19:31:46', '2017-12-15 22:15:15', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', b'1', '0', 'f9c13a05-8ba1-444b-aa12-3e90603264c1', 'test', '上海分公司角色', null, null, b'1'), ('7f2f1854-2faa-46ac-aff6-1ffefc55353a', '999', '2017-12-08 18:20:29', '2017-12-15 19:31:10', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '6512cc66-e600-46e6-b7ac-076e2b93666a', '综合1', b'1', '0', '1', 'admin_bus', '节点管理员', null, null, b'1'), ('e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '999', '2017-12-12 21:04:42', '2017-12-13 22:04:35', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '1', 'user_system', '系统用户', null, '', b'1');
COMMIT;

-- ----------------------------
--  Table structure for `role_permission_mapping`
-- ----------------------------
DROP TABLE IF EXISTS `role_permission_mapping`;
CREATE TABLE `role_permission_mapping` (
  `id` varchar(40) NOT NULL COMMENT '主键',
  `tenant_id` varchar(40) DEFAULT NULL,
  `role_id` varchar(40) DEFAULT NULL COMMENT '角色Id',
  `permission_code` varchar(50) DEFAULT NULL COMMENT '资源编码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `role_permission_mapping`
-- ----------------------------
BEGIN;
INSERT INTO `role_permission_mapping` VALUES ('069dad4c-be15-4bed-9c4c-cd4ea4bc2ea5', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'workflow:task'), ('0829ccb8-0b4d-42ec-95fe-9da55ef0e096', null, '1', 'system:auth:position'), ('0d6679df-a1f9-4464-9518-7033347ed94e', null, '1', 'workflow:task:listhandle'), ('0f6a9f57-62ff-4403-9880-5bb309b0cff5', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'workflow:task:listall'), ('217ea12b-bfcb-4dd9-9d3c-6b6d9d970a8b', null, '1', 'system:auth:dept'), ('39ecdfd8-ec46-4bbb-865f-a3aaf3a34a84', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'workflow:demo'), ('4e027b6f-dd75-4f19-b3b2-cb8eb35cb42d', null, '1', 'system:org:user'), ('4e680009-b8aa-4101-a31f-3773401315e5', null, '1', 'workflow:task:listall'), ('511f2803-7963-4a9f-87fa-be196117f260', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'workflow:task:listdraft'), ('5356e9a4-0cb1-4684-b171-8ce2fd7d026f', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'workflow:task:listhandle'), ('538fe721-2b9e-4785-b2f5-3c2dcf8d0be9', null, '1', 'workflow:task'), ('5dc07e43-df86-492d-ac83-9ac05d7d4232', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'system:auth:dept'), ('627dd0d5-d9c4-4015-b77d-58a8b7843402', null, '1', 'workflow:task:listinitiator'), ('62bc94c0-2ff8-4d84-8853-aa49662fe170', null, '1', 'system:org:user:create'), ('6f825406-7e8a-4bd9-b78f-95d7dff712d3', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'system:auth'), ('723161d4-af9c-4a06-a848-ea309b28dd29', null, '1', 'system:org:user:update'), ('833d1f14-1ece-4b65-b904-f15fda856f15', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'workflow:task:listinitiator'), ('83578a9a-4248-4fd1-806a-c14cb50c3388', null, '1', 'system:org'), ('8b1274a7-4633-47f8-8e2e-2a465775baf5', null, '1', 'workflow:demo'), ('989f00d0-cc59-47d5-a2e5-3e52c14dfd4a', null, '1', 'system:auth:role'), ('9ad8341e-f7f4-4229-a9c4-fb00cccb876e', null, '1', 'workflow:task:listdraft'), ('a0cb2f72-086e-47f4-bee7-af058750fc68', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'workflow:task:demo'), ('a9bc6af8-d2ad-46a6-9100-bb785be376d2', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'system:auth:role'), ('c7ea8b64-6246-46cd-a13c-77a7910469a9', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'system:auth:position'), ('cc0b0964-317d-4b70-9a69-b37fd70fc9a2', null, '1', 'system:auth'), ('ccc34048-8c3c-4d83-a819-e39fa0dd84ba', null, '1', 'system:auth:grade'), ('d936cfc9-da08-4de2-b568-acac599ed4fc', null, 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', 'system:auth:grade'), ('dac0dff8-5cb0-4bba-907c-e144fce7c4e3', '999', '2', 'workflow:task'), ('fc6f61a1-6e97-4c3a-8cf8-b4549776fb3d', null, '1', 'workflow:task:demo');
COMMIT;

-- ----------------------------
--  Table structure for `role_user_mapping`
-- ----------------------------
DROP TABLE IF EXISTS `role_user_mapping`;
CREATE TABLE `role_user_mapping` (
  `id` varchar(40) NOT NULL COMMENT '主键',
  `tenant_id` varchar(40) DEFAULT NULL,
  `user_id` varchar(40) DEFAULT NULL COMMENT '用户Id',
  `user_name` varchar(50) DEFAULT NULL COMMENT '用户名称',
  `role_id` varchar(40) DEFAULT NULL COMMENT '角色Id',
  `role_name` varchar(50) DEFAULT NULL COMMENT '角色名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `role_user_mapping`
-- ----------------------------
BEGIN;
INSERT INTO `role_user_mapping` VALUES ('0f45dd17-3ab6-4348-89b7-fb6e34ec05c3', '999', '6512cc66-e600-46e6-b7ac-076e2b936601', '综合2', '7f2f1854-2faa-46ac-aff6-1ffefc55353a', '节点管理员'), ('31c501e8-49d5-4e0f-9f2c-84447cfdd31e', '999', '82840500-af06-4260-8ab7-c8c48e704c28', 'A', 'string', 'string'), ('34ddb26c-91a5-4320-9e1b-e1b33ff68c12', '999', '9e222339-7ce2-4b01-9a01-67df4a9d4635', 'X', 'string', 'string'), ('41ec9f7e-cdec-4307-80bb-0ec7c1eb7a07', '999', 'd46d2b71-7635-49a8-a156-e2ade8091be4', 'C', 'string', 'string'), ('4820b416-b90c-4e42-ae20-3e2c39f10ee7', '999', '1', '超级管理员', '1', '系统管理员'), ('51fc6260-7453-460f-80b5-0e239c0981a9', '999', '6512cc66-e600-46e6-b7ac-076e2b936605', '综合6', '7f2f1854-2faa-46ac-aff6-1ffefc55353a', '节点管理员'), ('5987558c-09e5-4666-b86b-36a032f9aa57', '999', 'c787cc6f-d768-4ad5-a741-f31dd7715c5f', 'B', 'string', 'string'), ('6453db82-e0c1-4f5f-af5b-0c7cab648a93', '999', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2', '流程统计专员'), ('6bb17b7e-86fc-443f-ba6f-fcbf90efe7e9', '999', '6512cc66-e600-46e6-b7ac-076e2b936603', '综合4', '7f2f1854-2faa-46ac-aff6-1ffefc55353a', '节点管理员'), ('9944337f-3dff-4e05-a704-188633ceaf1b', '999', '6512cc66-e600-46e6-b7ac-076e2b936602', '综合3', '7f2f1854-2faa-46ac-aff6-1ffefc55353a', '节点管理员'), ('a7aef23a-3c65-4fb6-b812-77fd4f3822aa', '999', '6512cc66-e600-46e6-b7ac-076e2b93666a', '综合1', '7f2f1854-2faa-46ac-aff6-1ffefc55353a', '节点管理员'), ('aad1a4f9-ee5a-4b53-b907-36832a3a2e88', '999', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', '7f2f1854-2faa-46ac-aff6-1ffefc55353a', '节点管理员'), ('b29ae2b7-fe76-4b55-a4ec-39843eaf5430', '999', '6512cc66-e600-46e6-b7ac-076e2b936604', '综合5', '7f2f1854-2faa-46ac-aff6-1ffefc55353a', '节点管理员'), ('bb1c41b3-642c-44af-b0da-c627fc64bf3e', '999', 'b6b59924-f367-4d4c-8aea-511142e42cdf', '999', 'string', 'string'), ('fb43c24f-e00e-11e7-b1b3-0242ac120003', '999', '0193b885-f5a8-435d-90d3-76c8fab7c949', '王五', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43c59a-e00e-11e7-b1b3-0242ac120003', '999', '0463af29-5c78-4c54-85e4-fae3f7951bc5', '张一伟', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43c64a-e00e-11e7-b1b3-0242ac120003', '999', '0bec7771-b8b5-4d4a-ac6d-7104ac07bb46', '测试7', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43c7b8-e00e-11e7-b1b3-0242ac120003', '999', '1', '超级管理员', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43c850-e00e-11e7-b1b3-0242ac120003', '999', '100bd9c0-10c8-4c16-aff9-ff1202aee2dd', '测试4', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43c8d2-e00e-11e7-b1b3-0242ac120003', '999', '27a1ac7e-8910-4846-94de-508d16872fa7', '测试9', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43c93a-e00e-11e7-b1b3-0242ac120003', '999', '3b3f366a-9703-42f9-9a7b-3a7795521003', '测试3', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43c9b1-e00e-11e7-b1b3-0242ac120003', '999', '4838fb70-992e-48dd-a9cb-4e9d808b060b', '测试1', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43ca1b-e00e-11e7-b1b3-0242ac120003', '999', '58c016f8-9651-401c-82f4-196a8636441e', '员工9', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43ca81-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936601', '综合2', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cb04-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936602', '综合3', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cb79-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936603', '综合4', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cbe3-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936604', '综合5', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cc57-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936605', '综合6', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43ccce-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936611', '财务1', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cd41-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936612', '财务2', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cdc1-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936613', '财务3', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43ce94-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936621', '运维1', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cf68-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b936622', '运维2', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43cfe2-e00e-11e7-b1b3-0242ac120003', '999', '6512cc66-e600-46e6-b7ac-076e2b93666a', '综合1', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43d037-e00e-11e7-b1b3-0242ac120003', '999', '6f323bff-c158-419e-b4f2-d799656b5fe0', '孙七', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43d085-e00e-11e7-b1b3-0242ac120003', '999', '73fd96a3-323c-4968-892c-aeb999924f78', '李四', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43d0e8-e00e-11e7-b1b3-0242ac120003', '999', '751b7f52-f814-4e46-8643-f368e96b8bbe', '赵星火', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43d18d-e00e-11e7-b1b3-0242ac120003', '999', '797cadfd-232b-4449-a861-38eeea22ca2b', '员工11', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43d1fe-e00e-11e7-b1b3-0242ac120003', '999', '881f475b-49f6-4ced-b7f5-544feb011e3c', '员工7', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43d801-e00e-11e7-b1b3-0242ac120003', '999', '8a64aa6f-32b6-478b-a5cf-444ebdd0aee6', '何燎原', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43da6d-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc01', '技术1', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43dc2d-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc02', '技术2', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43de48-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc03', '技术3', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43e0d8-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc04', '技术4', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43e2dc-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc05', '技术5', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43e524-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc06', '技术6', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43e70d-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc07', '人力1', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43e841-e00e-11e7-b1b3-0242ac120003', '999', '966b0772-f87d-43b8-90d7-e95244a9dc48', '赵六', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43e957-e00e-11e7-b1b3-0242ac120003', '999', '9b8f2e6c-2124-4612-92ba-0b784c0c8540', '测试2', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43ea58-e00e-11e7-b1b3-0242ac120003', '999', '9c369265-aea3-4eec-aa9b-9a5cafb156bc', '员工3', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43eb1b-e00e-11e7-b1b3-0242ac120003', '999', 'aa425227-389b-43f2-9632-a63b9844f740', '测试11', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43ebe7-e00e-11e7-b1b3-0242ac120003', '999', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43ecd7-e00e-11e7-b1b3-0242ac120003', '999', 'bfd73592-f669-48c7-a56e-373ddd0f915c', '张三', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43edc5-e00e-11e7-b1b3-0242ac120003', '999', 'c65a74e2-198c-481d-8296-c155eefc3f15', '王解放', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43eeee-e00e-11e7-b1b3-0242ac120003', '999', 'd15dd2b8-086f-4120-b59f-56850963361c', '李建设', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43efb0-e00e-11e7-b1b3-0242ac120003', '999', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43f097-e00e-11e7-b1b3-0242ac120003', '999', 'f342584a-df41-47de-beca-1db53a5a1b02', '员工2', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户'), ('fb43f117-e00e-11e7-b1b3-0242ac120003', '999', 'f6a3d5ce-382f-4657-869c-9812cb64981a', '员工4', 'e4dbd056-cfd2-4a1a-b21f-b2fa48a09eba', '系统用户');
COMMIT;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `py` varchar(255) DEFAULT NULL COMMENT '拼音',
  `account` varchar(255) DEFAULT NULL COMMENT '账号',
  `password` varchar(255) DEFAULT NULL COMMENT '密码',
  `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  `mobile` varchar(255) DEFAULT NULL COMMENT '手机',
  `company` varchar(255) DEFAULT NULL,
  `dept_id` varchar(255) DEFAULT NULL COMMENT '所属部门',
  `dept_name` varchar(255) DEFAULT NULL COMMENT '所属名称',
  `grade_id` varchar(255) DEFAULT NULL COMMENT '职级',
  `grade_name` varchar(255) DEFAULT NULL COMMENT '职级名称',
  `leader_id` varchar(255) DEFAULT NULL,
  `leader_name` varchar(255) DEFAULT NULL,
  `status_flag` bit(1) DEFAULT NULL COMMENT '在职状态：[0：离职，1：正常]',
  `perm_flag` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('0193b885-f5a8-435d-90d3-76c8fab7c949', '999', '2017-11-23 13:29:08', '1', '1', '2017-11-23 13:29:08', '1', '1', b'1', '0', '王五', 'W', 'wangwu', 'wangwu', null, null, '1', '9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '财务部', '3', '部门主任', null, null, b'1', null), ('0463af29-5c78-4c54-85e4-fae3f7951bc5', '999', '2017-11-23 13:22:30', '1', '1', '2017-12-17 17:57:58', '1', '超级管理员', b'1', '0', '张一伟', 'Z', 'zhangyiwei', 'zhangyiwei', null, null, '1', '1', 'XX公司', '2', '董事长', null, null, b'1', b'1'), ('0bec7771-b8b5-4d4a-ac6d-7104ac07bb46', '999', '2017-11-25 15:18:32', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:19:17', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '测试7', 'C', 'ceshi7', 'ceshi7', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '819d63e4-803d-4a3a-9184-63b1b05ddcd6', '人力资源部', '3', '部门主任', null, null, b'1', null), ('1', '999', '2017-11-10 18:53:32', '1', '1', '2017-12-13 21:53:51', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '超级管理员', 'C', 'admin', 'admin', 'admin', '', '1', '1', 'XX公司', '1', '分管副总', '0463af29-5c78-4c54-85e4-fae3f7951bc5', '张一伟', b'1', null), ('100bd9c0-10c8-4c16-aff9-ff1202aee2dd', '999', '2017-11-25 15:18:10', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:18:10', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '测试4', 'C', 'ceshi4', 'ceshi4', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '8482ccdd-8c82-4ae1-ae9a-b3f5114df80a', '综合部', '3', '部门主任', null, null, b'1', null), ('27a1ac7e-8910-4846-94de-508d16872fa7', '999', '2017-11-25 15:19:48', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:19:48', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '测试9', 'C', 'ceshi9', 'ceshi9', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '308a3a7f-42f6-4857-a6a4-ba7eac2572e4', '财务部', '3', '部门主任', null, null, b'1', null), ('3b3f366a-9703-42f9-9a7b-3a7795521003', '999', '2017-11-25 15:17:14', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:17:14', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '测试3', 'C', 'ceshi3', 'ceshi3', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', '1', '分管副总', null, null, b'1', null), ('4838fb70-992e-48dd-a9cb-4e9d808b060b', '999', '2017-11-25 14:56:15', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 14:56:45', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '测试1', 'C', 'ceshi1', 'ceshi1', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', '4', '总经理', null, null, b'1', null), ('58c016f8-9651-401c-82f4-196a8636441e', '999', '2017-11-25 15:10:50', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-12-13 09:30:37', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '员工9', 'Y', 'yuangong9', 'yuangong9', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '839c33f4-fb40-43a2-bda5-b6403442386b', '财务部', '3', '部门主任', null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936601', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '综合2', 'Z', 'zonghe2', 'zonghe2', null, null, '1', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936602', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '综合3', 'Z', 'zonghe3', 'zonghe3', null, null, '1', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936603', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '综合4', 'Z', 'zonghe4', 'zonghe4', null, null, '1', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936604', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '综合5', 'Z', 'zonghe5', 'zonghe5', null, null, '1', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936605', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '综合6', 'Z', 'zonghe6', 'zonghe6', null, null, '1', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936611', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '财务1', 'C', 'caiwu1', 'caiwu1', null, null, '1', '9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '财务部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936612', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '财务2', 'C', 'caiwu2', 'caiwu2', null, null, '1', '9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '财务部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936613', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '财务3', 'C', 'caiwu3', 'caiwu3', null, null, '1', '9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '财务部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936621', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '运维1', 'Y', 'yunwei1', 'yunwei1', null, null, '1', 'ee8a3820-295f-47f5-bfe5-793c4426ca54', '运维部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b936622', '999', '2017-11-25 16:54:14', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '运维2', 'Y', 'yunwei2', 'yunwei2', null, null, '1', 'ee8a3820-295f-47f5-bfe5-793c4426ca54', '运维部', null, null, null, null, b'1', null), ('6512cc66-e600-46e6-b7ac-076e2b93666a', '999', '2017-11-25 16:54:14', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 16:54:14', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '综合1', 'Z', 'zonghe1', 'zonghe1', null, null, '1', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', null, null, null, null, b'1', null), ('6f323bff-c158-419e-b4f2-d799656b5fe0', '999', '2017-11-23 13:30:08', '1', '1', '2017-11-23 13:30:08', '1', '1', b'1', '0', '孙七', 'S', 'sunqi', 'sunqi', null, null, '1', 'ee8a3820-295f-47f5-bfe5-793c4426ca54', '运维部', '3', '部门主任', null, null, b'1', null), ('73fd96a3-323c-4968-892c-aeb999924f78', '999', '2017-11-23 13:28:33', '1', '1', '2017-11-23 13:28:33', '1', '1', b'1', '0', '李四', 'L', 'lisi', 'lisi', null, null, '1', 'db01bc2b-b8ea-4b77-9a4d-c4decb7c4b2d', '人力资源部', '3', '部门主任', null, null, b'1', null), ('751b7f52-f814-4e46-8643-f368e96b8bbe', '999', '2017-11-25 15:58:24', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:58:24', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '赵星火', 'Z', 'zhaoxinghuo', 'zhaoxinghuo', null, null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', '1', '分管副总', null, null, b'1', null), ('797cadfd-232b-4449-a861-38eeea22ca2b', '999', '2017-11-25 15:11:44', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:11:44', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '员工11', 'Y', 'yuangong11', 'yuangong11', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '59ee6f00-9052-4bd5-b893-69cce9cf86aa', '销售部', '3', '部门主任', null, null, b'1', null), ('881f475b-49f6-4ced-b7f5-544feb011e3c', '999', '2017-11-25 15:08:37', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:09:00', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '员工7', 'Y', 'yuangong7', 'yuangong7', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '4bb82293-cceb-4c28-9c18-4ca8d351b9f3', '人力资源部', '3', '部门主任', null, null, b'1', null), ('8a64aa6f-32b6-478b-a5cf-444ebdd0aee6', '999', '2017-11-25 15:59:18', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:59:18', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '何燎原', 'H', 'heliaoyuan', 'heliaoyuan', null, null, '1', 'ee8a3820-295f-47f5-bfe5-793c4426ca54', '运维部', '1', '分管副总', null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc01', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '技术1', 'J', 'jishu1', 'jishu1', 'jishu1', null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', null, null, null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc02', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '技术2', 'J', 'jishu2', 'jishu2', 'jishu2', null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', null, null, null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc03', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '技术3', 'J', 'jishu3', 'jishu3', 'jishu3', null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', null, null, null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc04', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '技术4', 'J', 'jishu4', 'jishu4', 'jishu4', null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', null, null, null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc05', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '技术5', 'J', 'jishu5', 'jishu5', 'jishu5', null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', null, null, null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc06', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '技术6', 'J', 'jishu6', 'jishu6', 'jishu6', null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', null, null, null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc07', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '人力1', 'R', 'renli1', 'renli1', null, null, '1', 'db01bc2b-b8ea-4b77-9a4d-c4decb7c4b2d', '人力资源部', null, null, null, null, b'1', null), ('966b0772-f87d-43b8-90d7-e95244a9dc48', '999', '2017-11-23 13:29:37', '1', '1', '2017-11-23 13:29:37', '1', '1', b'1', '0', '赵六', 'Z', 'zhaoliu', 'zhaoliu', null, null, '1', '8b3097a2-e46e-494f-bd6a-2a22155275f7', '技术部', '3', '部门主任', null, null, b'1', null), ('9b8f2e6c-2124-4612-92ba-0b784c0c8540', '999', '2017-11-25 15:13:43', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:13:43', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '测试2', 'C', 'ceshi2', 'ceshi2', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '北京分公司', '1', '分管副总', null, null, b'1', null), ('9c369265-aea3-4eec-aa9b-9a5cafb156bc', '999', '2017-11-25 15:07:22', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:07:22', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '员工3', 'Y', 'yuangong3', 'yuangong3', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', null, null, null, null, b'1', null), ('aa425227-389b-43f2-9632-a63b9844f740', '999', '2017-11-25 15:20:20', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:31:31', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '测试11', 'C', 'ceshi11', 'ceshi11', null, null, 'c3ce2183-03d9-45e2-a09b-9b4507db03dc', '205fbdb0-6449-4205-baed-7aeb96df4144', '销售部', '3', '部门主任', null, null, b'1', null), ('b57b83b7-7c05-4108-a723-91ce145e298b', '999', '2017-11-25 14:59:39', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 14:59:39', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '员工1', 'Y', 'yuangong1', 'yuangong1', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', null, null, null, null, b'1', null), ('bfd73592-f669-48c7-a56e-373ddd0f915c', '999', '2017-11-23 13:27:41', '1', '1', '2017-11-25 16:00:26', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '张三', 'Z', 'zhangsan', 'zhangsan', null, null, '1', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部', '3', '部门主任', null, null, b'1', null), ('c65a74e2-198c-481d-8296-c155eefc3f15', '999', '2017-11-23 13:26:17', '1', '1', '2017-11-23 13:26:17', '1', '1', b'1', '0', '王解放', 'W', 'wangjiefang', 'wangjiefang', null, null, '1', '7a58efb7-1271-4bd6-947e-acacea60c208', '公司总部', '4', '总经理', null, null, b'1', null), ('d15dd2b8-086f-4120-b59f-56850963361c', '999', '2017-11-25 15:57:20', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:57:20', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '李建设', 'L', 'lijianshe', 'lijianshe', null, null, '1', '9f4a97d7-301a-4c52-b7ce-bd0ab262881d', '财务部', '1', '分管副总', null, null, b'1', null), ('e904e29d-c1a0-4495-aff0-4965b627752d', '999', '2017-11-24 11:49:18', '1', '1', '2017-11-24 11:49:18', '1', '1', b'1', '0', '人力2', 'R', 'renli2', 'renli2', null, null, '1', 'db01bc2b-b8ea-4b77-9a4d-c4decb7c4b2d', '人力资源部', null, null, null, null, b'1', null), ('f342584a-df41-47de-beca-1db53a5a1b02', '999', '2017-11-25 15:06:47', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:06:47', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '员工2', 'Y', 'yuangong2', 'yuangong2', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '上海分公司', '1', '分管副总', null, null, b'1', null), ('f6a3d5ce-382f-4657-869c-9812cb64981a', '999', '2017-11-25 15:08:15', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', '2017-11-25 15:08:15', 'e904e29d-c1a0-4495-aff0-4965b627752d', '人力2', b'1', '0', '员工4', 'Y', 'yuangong4', 'yuangong4', null, null, 'f9c13a05-8ba1-444b-aa12-3e90603264c1', '1c6f1d6f-6197-4577-bd88-54c0011ef8e0', '综合部', '3', '部门主任', null, null, b'1', null);
COMMIT;

-- ----------------------------
--  Table structure for `user_perm_mapping`
-- ----------------------------
DROP TABLE IF EXISTS `user_perm_mapping`;
CREATE TABLE `user_perm_mapping` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `user_id` varchar(255) NOT NULL COMMENT '用户Id',
  `user_name` varchar(255) DEFAULT NULL COMMENT '用户名称',
  `perm_type` int(11) NOT NULL COMMENT '授权类型',
  `perm_id` varchar(255) NOT NULL COMMENT '授权Id',
  `perm_name` varchar(255) DEFAULT NULL COMMENT '授权名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user_perm_mapping`
-- ----------------------------
BEGIN;
INSERT INTO `user_perm_mapping` VALUES ('351ecbab-c8cc-449b-9300-d67a9e5e1915', '999', '0463af29-5c78-4c54-85e4-fae3f7951bc5', '张一伟', '1', 'c65a74e2-198c-481d-8296-c155eefc3f15', '王解放'), ('406debca-295e-4e62-a5e6-9f8573a347b4', '999', '0463af29-5c78-4c54-85e4-fae3f7951bc5', '张一伟', '2', '0546b28a-9681-4b3e-ac07-7dbe78e36b1c', '综合部');
COMMIT;

-- ----------------------------
--  Table structure for `wf_collaboration`
-- ----------------------------
DROP TABLE IF EXISTS `wf_collaboration`;
CREATE TABLE `wf_collaboration` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `apply_id` varchar(255) NOT NULL COMMENT '申请人Id',
  `apply_name` varchar(255) NOT NULL COMMENT '申请人名称',
  `apply_dept_id` varchar(255) NOT NULL COMMENT '申请人部门Id',
  `apply_dept_name` varchar(255) NOT NULL COMMENT '申请人部门名称',
  `apply_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请时间',
  `workflow_status` int(11) NOT NULL COMMENT '工作流状态',
  `collaboration_dept_id` varchar(255) NOT NULL COMMENT '协作部门Id',
  `collaboration_dept_name` varchar(255) NOT NULL COMMENT '协作部门名称',
  `task_name` varchar(255) NOT NULL COMMENT '任务名称',
  `task_content` varchar(255) NOT NULL COMMENT '任务内容',
  `users` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `wf_define`
-- ----------------------------
DROP TABLE IF EXISTS `wf_define`;
CREATE TABLE `wf_define` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `code` varchar(255) DEFAULT NULL COMMENT '流程编码',
  `name` varchar(255) DEFAULT NULL COMMENT '流程名称',
  `description` varchar(255) DEFAULT NULL COMMENT '流程描述',
  `status_flag` bit(1) NOT NULL COMMENT '启停用状态：[0：停用，1：启用]',
  `start_node_id` varchar(255) DEFAULT NULL COMMENT '流程开始节点id',
  `start_node_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wf_define`
-- ----------------------------
BEGIN;
INSERT INTO `wf_define` VALUES ('999', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '000001', '工作协作单流程', '用于XXXX使用', b'1', 'c03da0b0-77e2-4816-ad80-1d0d17775ee4', '开始');
COMMIT;

-- ----------------------------
--  Table structure for `wf_demo`
-- ----------------------------
DROP TABLE IF EXISTS `wf_demo`;
CREATE TABLE `wf_demo` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wf_demo`
-- ----------------------------
BEGIN;
INSERT INTO `wf_demo` VALUES ('b89e1915-5cdb-4289-9231-3e5c1b1403b3', '999', '2017-12-19 23:03:19', '1', '超级管理员', '2017-12-19 23:03:19', '1', '超级管理员', b'1', '0'), ('e3df7d19-e35b-4281-b576-2a0ae89c695e', '999', '2017-12-18 23:50:07', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', '2017-12-18 23:50:07', 'b57b83b7-7c05-4108-a723-91ce145e298b', '员工1', b'1', '0');
COMMIT;

-- ----------------------------
--  Table structure for `wf_demo_perm_mapping`
-- ----------------------------
DROP TABLE IF EXISTS `wf_demo_perm_mapping`;
CREATE TABLE `wf_demo_perm_mapping` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `demo_id` varchar(255) NOT NULL COMMENT '关联Id',
  `perm_type` int(11) NOT NULL COMMENT '授权类型',
  `perm_id` varchar(255) NOT NULL COMMENT '授权Id',
  `perm_name` varchar(255) DEFAULT NULL COMMENT '授权名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wf_demo_perm_mapping`
-- ----------------------------
BEGIN;
INSERT INTO `wf_demo_perm_mapping` VALUES ('4e831b92-f215-40b0-8dfb-eb4f990e801c', '999', 'b89e1915-5cdb-4289-9231-3e5c1b1403b3', '2', '68a0116c-2f6b-47eb-92ab-00317ed54e15', '群组2'), ('70bb2aaf-7e59-4f46-be93-5f87159f7b58', '999', 'b89e1915-5cdb-4289-9231-3e5c1b1403b3', '2', '7861dca7-1555-404c-b3b4-4038f24179a5', '群组1'), ('b2376f66-cb25-4fc5-8947-ae38146db33e', '999', 'b89e1915-5cdb-4289-9231-3e5c1b1403b3', '1', '0463af29-5c78-4c54-85e4-fae3f7951bc5', '张一伟'), ('b525a59a-2e4e-4769-879c-496e0cbe1f39', '999', 'b89e1915-5cdb-4289-9231-3e5c1b1403b3', '1', '1', '超级管理员'), ('e61212a2-369b-4c3e-9b6b-b5572e56f58e', '999', 'e3df7d19-e35b-4281-b576-2a0ae89c695e', '1', '1', '2'), ('f9e02654-3f6c-4ec1-b6ec-6dd4c5387a37', '999', 'e3df7d19-e35b-4281-b576-2a0ae89c695e', '2', '1', '1');
COMMIT;

-- ----------------------------
--  Table structure for `wf_instance`
-- ----------------------------
DROP TABLE IF EXISTS `wf_instance`;
CREATE TABLE `wf_instance` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `apply_id` varchar(255) NOT NULL COMMENT '申请人Id',
  `apply_name` varchar(255) NOT NULL COMMENT '申请人名称',
  `apply_dept_id` varchar(255) NOT NULL COMMENT '申请人部门Id',
  `apply_dept_name` varchar(255) NOT NULL COMMENT '申请人部门名称',
  `apply_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请时间',
  `workflow_status` int(11) NOT NULL COMMENT '工作流状态',
  `wf_type` int(11) NOT NULL COMMENT '流程类型',
  `wf_data_id` varchar(255) NOT NULL COMMENT '流程数据主键',
  `wf_id` varchar(255) NOT NULL COMMENT '流程定义ID',
  `wf_define_code` varchar(255) NOT NULL COMMENT '流程定义编码',
  `wf_define_version` bigint(20) DEFAULT NULL COMMENT '流程定义版本号',
  `wf_form_code` varchar(255) DEFAULT NULL COMMENT '流程表单编码',
  `wf_form_version` int(11) DEFAULT NULL COMMENT '流程表单版本号',
  `active_node_id` varchar(255) NOT NULL COMMENT '当前节点id',
  `active_node_name` varchar(255) NOT NULL COMMENT '当前节点名称',
  `summary` varchar(255) DEFAULT NULL COMMENT '流程摘要',
  `last_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `wf_node`
-- ----------------------------
DROP TABLE IF EXISTS `wf_node`;
CREATE TABLE `wf_node` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `wf_id` varchar(255) DEFAULT NULL COMMENT '流程id',
  `next_id` varchar(255) DEFAULT NULL COMMENT '流程下一个节点id',
  `name` varchar(255) DEFAULT NULL COMMENT '节点名称',
  `type` varchar(255) DEFAULT NULL COMMENT '节点类型',
  `status` int(11) DEFAULT NULL COMMENT '节点状态',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wf_node`
-- ----------------------------
BEGIN;
INSERT INTO `wf_node` VALUES ('14a1c7c8-c739-4394-a0e2-1176daa30a0a', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', null, '完成', 'completeNode', '2'), ('418dc13e-812a-43bd-bf69-82c46722bf8b', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', null, '部门主任审核', 'taskNode', '1'), ('48beaa42-545c-465a-b1d7-12c9daeca524', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', null, '结束', 'endNode', '3'), ('5f8a83d3-efd9-49c9-b66d-96aa50ee5f24', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', null, '申请人确认', 'taskNode', '1'), ('7422195c-e3fd-4401-bde8-4b3c6c7a60cd', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', null, '协作部门主任审核', 'taskNode', '1'), ('c03da0b0-77e2-4816-ad80-1d0d17775ee4', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', null, '开始', 'startNode', '0'), ('e49a9fae-5087-4043-8c0c-c2901cd597d7', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', null, '协作人员确认', 'mergeNode', '1');
COMMIT;

-- ----------------------------
--  Table structure for `wf_node_action`
-- ----------------------------
DROP TABLE IF EXISTS `wf_node_action`;
CREATE TABLE `wf_node_action` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `wf_id` varchar(255) DEFAULT NULL COMMENT '流程id',
  `wf_node_id` varchar(255) DEFAULT NULL COMMENT '流程节点Id',
  `to_node_id` varchar(255) DEFAULT NULL COMMENT '流转到哪个流程节点',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wf_node_action`
-- ----------------------------
BEGIN;
INSERT INTO `wf_node_action` VALUES ('08c59974-092f-4f38-9282-847df175aa8f', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', '7422195c-e3fd-4401-bde8-4b3c6c7a60cd', '7422195c-e3fd-4401-bde8-4b3c6c7a60cd', '驳回', '1'), ('0b30805d-9067-4bbb-9ff3-0fb2408ca34e', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', '5f8a83d3-efd9-49c9-b66d-96aa50ee5f24', '5f8a83d3-efd9-49c9-b66d-96aa50ee5f24', '驳回', '1'), ('2bc71e64-ca3b-4a8f-9f56-8caa3b3db8e0', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', 'c03da0b0-77e2-4816-ad80-1d0d17775ee4', '418dc13e-812a-43bd-bf69-82c46722bf8b', '提交', '0'), ('393348fa-f90f-4524-983c-801e86e35743', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', '7422195c-e3fd-4401-bde8-4b3c6c7a60cd', 'e49a9fae-5087-4043-8c0c-c2901cd597d7', '确认', '0'), ('496907ee-1d42-469c-89de-04fe568e1c44', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', 'c03da0b0-77e2-4816-ad80-1d0d17775ee4', '48beaa42-545c-465a-b1d7-12c9daeca524', '作废', '1'), ('7e67171b-908f-4d15-9adc-4b00aa569ba1', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', '5f8a83d3-efd9-49c9-b66d-96aa50ee5f24', '14a1c7c8-c739-4394-a0e2-1176daa30a0a', '确认', '0'), ('8b4e8d14-5fb1-4850-80d2-c335bb888f09', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', 'e49a9fae-5087-4043-8c0c-c2901cd597d7', '5f8a83d3-efd9-49c9-b66d-96aa50ee5f24', '确认', '0'), ('c9321eef-3653-4a70-8784-766b63160278', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', '418dc13e-812a-43bd-bf69-82c46722bf8b', '7422195c-e3fd-4401-bde8-4b3c6c7a60cd', '确认', '0'), ('d2a6a7e3-c49a-42da-9b6f-bf7eab92f294', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', '418dc13e-812a-43bd-bf69-82c46722bf8b', '7a88c626-dbd9-4e0b-8ede-39a7449408ac', '驳回', '1'), ('df5bfd51-81d9-4c7b-997e-d3efd5e8a265', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', 'e49a9fae-5087-4043-8c0c-c2901cd597d7', 'e49a9fae-5087-4043-8c0c-c2901cd597d7', '驳回', '1');
COMMIT;

-- ----------------------------
--  Table structure for `wf_node_permission`
-- ----------------------------
DROP TABLE IF EXISTS `wf_node_permission`;
CREATE TABLE `wf_node_permission` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `wf_id` varchar(255) DEFAULT NULL COMMENT '流程id',
  `wf_node_id` varchar(255) DEFAULT NULL COMMENT '流程节点Id',
  `by_apply` bit(1) DEFAULT NULL COMMENT '发起人',
  `by_user` varchar(255) DEFAULT NULL COMMENT '指定用户',
  `by_role` varchar(255) DEFAULT NULL COMMENT '指定角色',
  `by_form_user` varchar(255) DEFAULT NULL COMMENT '表单用户',
  `by_form_dept` varchar(255) DEFAULT NULL COMMENT '表单部门',
  `of_dept` bit(1) DEFAULT NULL COMMENT '部门',
  `of_leader` bit(1) DEFAULT NULL COMMENT '上级',
  `of_position` varchar(255) DEFAULT NULL COMMENT '岗位',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wf_node_permission`
-- ----------------------------
BEGIN;
INSERT INTO `wf_node_permission` VALUES ('41c40a7c-82ef-4da5-b61c-f93dd8d0ed9a', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', 'c03da0b0-77e2-4816-ad80-1d0d17775ee4', b'1', null, null, null, null, null, null, null), ('57ad8c55-9de9-4200-aa49-7917e7feef72', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', '5f8a83d3-efd9-49c9-b66d-96aa50ee5f24', b'1', null, null, null, null, null, null, null), ('782beacc-e00a-42b4-adbc-edd6c47e2462', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', 'e49a9fae-5087-4043-8c0c-c2901cd597d7', null, null, null, 'users', null, null, null, null), ('8ed0618c-6da1-4e41-9d28-4efd957a00f1', '999', '2017-11-28 15:58:01', '1', '张一伟', '2017-11-28 15:58:01', '1', '张一伟', b'1', '0', '999', '7422195c-e3fd-4401-bde8-4b3c6c7a60cd', null, null, null, null, 'collaborationDeptId', null, null, '004'), ('d2b49dca-bcc5-41ff-a23e-6454503d8d2d', '999', '2017-11-28 15:58:00', '1', '张一伟', '2017-11-28 15:58:00', '1', '张一伟', b'1', '0', '999', '418dc13e-812a-43bd-bf69-82c46722bf8b', b'1', null, null, null, null, b'1', null, '004');
COMMIT;

-- ----------------------------
--  Table structure for `wf_notice`
-- ----------------------------
DROP TABLE IF EXISTS `wf_notice`;
CREATE TABLE `wf_notice` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `workflow_status` int(11) NOT NULL COMMENT '流程节点状态',
  `workflow_type` int(11) NOT NULL COMMENT '流程类型',
  `instance_id` varchar(255) NOT NULL COMMENT '流程实例ID',
  `owner_id` varchar(255) NOT NULL COMMENT '流程节点拥有人Id',
  `owner_name` varchar(255) NOT NULL COMMENT '流程节点拥有人名称',
  `summary` varchar(255) NOT NULL COMMENT '流程摘要',
  `notice_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '通知时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `wf_permission`
-- ----------------------------
DROP TABLE IF EXISTS `wf_permission`;
CREATE TABLE `wf_permission` (
  `id` varchar(255) NOT NULL COMMENT '主键',
  `tenant_id` varchar(255) NOT NULL COMMENT '租户Id',
  `server_create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `creator_id` varchar(255) NOT NULL COMMENT '创建者ID',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者姓名',
  `server_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `updator_id` varchar(255) NOT NULL COMMENT '最后修改者ID',
  `updator_name` varchar(255) NOT NULL COMMENT '最后修改者姓名',
  `delete_flag` bit(1) NOT NULL COMMENT '逻辑删除状态:[0：删除，1：正常]',
  `version` bigint(20) NOT NULL COMMENT '数据版本控制',
  `workflow_type` int(11) DEFAULT NULL COMMENT '流程id',
  `user_id` varchar(255) DEFAULT NULL COMMENT '用户',
  `role_id` varchar(255) DEFAULT NULL,
  `dept_id` varchar(255) DEFAULT NULL,
  `group_id` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `type` int(11) DEFAULT NULL COMMENT '权限类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wf_permission`
-- ----------------------------
BEGIN;
INSERT INTO `wf_permission` VALUES ('c7a985a8-1ba4-46cf-ac39-b166e187fa6e', '999', '2017-12-16 23:46:47', '1', '超级管理员', '2017-12-16 23:46:47', '1', '超级管理员', b'1', '0', '0', null, null, null, '68a0116c-2f6b-47eb-92ab-00317ed54e15', '群组2', '0');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
